<?php
include_once '../data/database_dal.php';

class WhiteDAL extends DatabaseDAL
{
    function update($id, $rfqID, $dioxideContent, $dioxideType, $carrierType, $endApp, $fillerRequired, $specialRequirement, $inTime, $inUser)
    {
        $this->connect();
        $result = $this->mysqli->query("call pr_white_update('". $id ."', '". $rfqID ."', '". $dioxideContent ."', '". $dioxideType ."', '". $carrierType ."', '". $endApp ."',
                                                    '". $fillerRequired ."', '". $specialRequirement ."', '". $inTime ."', '". $inUser ."')");
        $this->close();
        return $this;
    }

    function get($where)
    {
        $this->connect();
        $result = $this->mysqli->query("call pr_white_get(".'"'. $where .'"'.")");
        $this->close();
        return $result;
    }

    function getAll($orderBy)
    {
        $this->connect();
        $result = $this->mysqli->query("call pr_white_list(".'"'. $orderBy .'"'.")");
        $this->close();
        return $result;
    }

    function delete($id)
    {
        $this->connect();
        $result = $this->mysqli->delete("call pr_white_delete('". $id ."')");
        $this->close();
        return $result;
    }
}

?>
